﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DecTrees
{
   public class TreeExample
   {
       decitionTree Tree;
       int Num1, Num2, Num3, Num4;

       public TreeExample()
       {
           Num1 = 8;
           Num2=3;
           Num3=4;
           Num4=2;
       }

       public void ActivateTree()
       {
           Tree.ScanTree();
       }

       public void SetTree(decitionTree Tree)
       {
           this.Tree = Tree;
       }

       public Boolean IsNum1GraterThan2()
       {
           if (Num1 > Num2)
           {
               return true;
           } 
           else
           {
               return false;
           }
       }

       public Boolean IsNum2GraterThan3()
       {
           if (Num2 > Num3)
           {
               return true;
           }
           else
           {
               return false;
           }
       }

       public Boolean IsNum3GraterThan4()
       {
           if (Num3 > Num4)
           {
               return true;
           }
           else
           {
               return false;
           }
       }

       public Boolean IsNum4GraterThan2()
       {
           if (Num4 > Num2)
           {
               return true;
           }
           else
           {
               return false;
           }
       }

       public void PrintNum1()
       {
           Console.WriteLine("Number 1 : " + Num1);
       }

       public void PrintNum2()
       {
           Console.WriteLine("Number 2 : " + Num2);
       }

       public void PrintNum3()
       {
           Console.WriteLine("Number 3 : " + Num3);
       }

       public void PrintNum4()
       {
           Console.WriteLine("Number 4 : " + Num4);
       }
   }

    class Program
    {
        //static void Main(string[] args)
        //{
        //    TreeExample EX = new TreeExample();

        //    // Creating Questions Attributes
        //    Attribute att1 = new Attribute("1 Grater than 2", new Question(EX.IsNum1GraterThan2));
        //    Attribute att2 = new Attribute("2 Grater than 3", new Question(EX.IsNum2GraterThan3));
        //    Attribute att3 = new Attribute("4 Grater than 2", new Question(EX.IsNum4GraterThan2));
        //    Attribute att4 = new Attribute("3 Grater than 4", new Question(EX.IsNum3GraterThan4));
        //    // Creating Actions Attributes
        //    Attribute att5 = new Attribute("Print 1", new Action(EX.PrintNum1));
        //    Attribute att6 = new Attribute("Print 2", new Action(EX.PrintNum2));
        //    Attribute att7 = new Attribute("Print 3", new Action(EX.PrintNum3));
        //    Attribute att8 = new Attribute("Print 4", new Action(EX.PrintNum4));
        //    // Creating Tree nodes
        //    TreeNode Root = new TreeNode(att1);
        //    TreeNode R1 = new TreeNode(att2);
        //    TreeNode L1 = new TreeNode(att3);
        //    TreeNode R2 = new TreeNode(att5);
        //    TreeNode L2 = new TreeNode(att6);
        //    TreeNode R3 = new TreeNode(att7);
        //    TreeNode L3 = new TreeNode(att8);
        //    //Connecting Tree nodes
        //    R1.AddRightTreeNode(R2);
        //    R1.AddLeftTreeNode(L2);
        //    L1.AddRightTreeNode(R3);
        //    L1.AddLeftTreeNode(L3);
        //    Root.AddRightTreeNode(R1);
        //    Root.AddLeftTreeNode(L1);
        //    //Creating desition tree
        //    decitionTree T = new decitionTree(Root);
        //    EX.SetTree(T);

        //    // Running desition tree
        //    EX.ActivateTree();
            
            
        //}
    }
}
